package com.action.customer;

import com.db.customer.*;

public class DeleteOkAction {

	private int no;
	private int boardtype;
	private String pwd;
	private String result;

	public String getResult() {
		return result;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public int getBoardtype() {
		return boardtype;
	}

	public void setBoardtype(int boardtype) {
		this.boardtype = boardtype;
	}

	public int getNo() {
		return no;
	}

	public void setNo(int no) {
		this.no = no;
	}

	public String execute() throws Exception {
		System.out.println("delete :" + no);
		CustomerVO vo = new CustomerVO();

		vo = CustomerDAO.customerFind(no);
		if (vo.getPwd().equals(pwd)) {
			result = "OK";
			CustomerDAO.customerDelete(no);
		} else {
			result = "NO";
		}

		return "success";
	}

}
